﻿<UserControl x:Class="Songhay.Silverlight.BiggestBox.IndexPart.Views.UserControls.MasterDetailSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
    xmlns:dftoolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"
    xmlns:m="clr-namespace:Songhay.Silverlight.BiggestBox.IndexPart.ViewModels"
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    Tag="Master-Detail Sample"
    Width="512" Height="400">
    <UserControl.Resources>
        <m:MasterDetailViewModel x:Key="MasterDetailViewModelDatasource" d:IsDataSource="True" />
    </UserControl.Resources>
    <toolkit:DockPanel
        DataContext="{StaticResource MasterDetailViewModelDatasource}"
        LastChildFill="True">
        <data:DataGrid toolkit:DockPanel.Dock="Top"
            x:Name="DataGridOne"
            Height="128"
            ItemsSource="{Binding DataItems, Mode=OneWay}"
            IsReadOnly="True">
        </data:DataGrid>
        <dftoolkit:DataForm toolkit:DockPanel.Dock="Bottom"
            AutoCommit="False"
            AutoEdit="False"
            CommandButtonsVisibility="Add,Cancel,Commit,Delete,Edit,Navigation"
            ItemsSource="{Binding DataItems, Mode=OneWay}">
        </dftoolkit:DataForm>
    </toolkit:DockPanel>
</UserControl>
